<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>我的账户-{$tpshop_config['shop_info_store_title']}</title>
    <meta name="keywords" content="{$tpshop_config['shop_info_store_keyword']}" />
    <meta name="description" content="{$tpshop_config['shop_info_store_desc']}" />
    <link rel="stylesheet" type="text/css" href="__STATIC__/css/tpshop.css" />
    <link rel="stylesheet" type="text/css" href="__STATIC__/css/myaccount.css" />
    <link rel="shortcut  icon" type="image/x-icon" href="__STATIC__/images/favicon.ico" media="screen"  />
    <script src="__STATIC__/js/jquery-1.11.3.min.js" type="text/javascript" charset="utf-8"></script>
</head>
<body class="bg-f5">
<include file="user/header"/>
<div class="home-index-middle">
    <div class="w1224">
        <div class="g-crumbs">
            <a href="{:U('User/index')}">我的商城</a><i class="litt-xyb"></i>
            <a href="{:U('User/order_list')}">订单中心</a><i class="litt-xyb"></i>
            <span><b>订单：{$order_info.order_sn}</b></span>
        </div>
        <div class="home-main">
            <div class="com-topyue">
                <div class="wacheng fl">
                    <p class="ddn1"><span>订单号：</span><span>{$order_info.order_sn}</span></p>
                    <if condition="$order_info.order_prom_type eq 4">
                        <p class="ddn1"><span>订单类型：</span><span>预售订单&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></p>
                        <if condition="$order_info.pre_sell_is_finished eq 2">
                            <p class="ddn1"><span>关闭原因：</span><span>商家取消活动，返换订金</span></p>
                            <h3 style="font: 700 24px/34px 'Microsoft YaHei';color: #e4393c; padding-top:20px;">订单关闭</h3>
                        </if>
                        <if condition="$order_info.pre_sell_is_finished eq 1">
                            <if condition="time() gt $order_info.pre_sell_retainage_end">
                                <p class="ddn1"><span>关闭原因：</span><span>已过支付尾款时间</span></p>
                                <h3 style="font: 700 24px/34px 'Microsoft YaHei';color: #e4393c; padding-top:20px;">订单关闭</h3>
                            </if>
                        </if>
                    </if>

                    <if condition="$order_info.pay_btn eq 1">
                        <h3 style="font: 700 24px/34px 'Microsoft YaHei';color: #e4393c; padding-top:20px;">等待付款</h3>
                        <a class="ddn3" style="margin-top:20px;" href="{:U('Home/Cart/cart4',array('order_id'=>$order_info[order_id]))}">立即付款</a>
                        <else/>
                        <h1 class="ddn2">{$order_info.order_status_desc}</h1>
                        <!--<a class="ddn3" href="">评价</a>-->
                    </if>
                    <if condition="$order_info.receive_btn eq 1 ">
                        <a class="ddn3" style="margin-top:20px;" href="javascript:;" onclick="order_confirm({$order_info['order_id']})">确认收货</a>
                    </if>
                    <if condition="$order_info.cancel_btn eq 1">
                        <a class="ddn3" style="margin-top:10px;color:#666;" href="javascript:;" onclick="cancel_order({$order_info.order_id})">取消订单</a>
                    </if>
                    <if condition="$order_info.order_prom_type eq 4 AND $order_info.pay_status eq 2 AND $order_info.pre_sell_is_finished eq 1 AND (time() egt $order_info.pre_sell_retainage_start AND time() elt $order_info.pre_sell_retainage_end)">
                        <a class="ddn3" style="margin-top:20px;" href="{:U('/Home/Cart/cart4',array('order_id'=>$order_info[order_id]))}'">支付尾款</a>
                    </if>

                    <p class="ddn4"><a href="{:U('order_detail',array('id'=>$order_info[order_id],'act'=>'print'))}" target="_blank"><i class="y-comp6"></i>打印订单</a></p>
                </div>
                <div class="wacheng2 fr">
                    <p class="dd2n">感谢您在商城购物，欢迎您对本次交易及所购商品进行评价。</p>
                    <div class="liuchaar p">
                        <ul>
                            <li>
                                <div class="aloinfe">
                                    <i class="y-comp"></i>
                                    <div class="ddfon">
                                        <p>提交订单</p>
                                        <p>{$order_info.add_time|date='Y-m-d',###}</p>
                                        <p>{$order_info.add_time|date='H:i:s',###}</p>
                                    </div>
                                </div>
                            </li>
                            <li><i class='y-comp91 <if condition="$order_info[pay_time] eq 0">top322</if>'></i></li>
                            <li>
                                <div class="aloinfe fime1">
                                    <i class='y-comp2 <if condition="$order_info[pay_time] eq 0">lef64</if>'></i>
                                    <div class="ddfon">
                                        <p>付款成功</p>
                                        <if condition="$order_info[pay_time] gt 0">
                                            <p>{$order_info.pay_time|date='Y-m-d H:i:s',###}</p>
                                        </if>
                                    </div>
                                </div>
                            </li>
                            <li><i class='y-comp91 <if condition="$order_info[shipping_time] eq 0">top322</if>'></i></li>
                            <li>
                                <div class="aloinfe fime2">
                                    <i class='y-comp3 <if condition="$order_info[shipping_time] eq 0">lef64</if>'></i>
                                    <div class="ddfon">
                                        <p>卖家发货</p>
                                        <if condition="$order_info[shipping_time] gt 0">
                                            <p>{$order_info.pay_time|date='Y-m-d',###}</p>
                                            <p>{$order_info.pay_time|date='H:i:s',###}</p>
                                        </if>
                                    </div>
                                </div>
                            </li>
                            <li><i class='y-comp91 <if condition="$order_info[shipping_time] eq 0">top322</if>'></i></li>
                            <li>
                                <div class="aloinfe fime3">
                                    <i class='y-comp4 <if condition="$order_info[shipping_time] eq 0">lef64</if>'></i>
                                    <div class="ddfon">
                                        <p>等待收货</p>
                                        <if condition="$order_info[shipping_time] gt 0">
                                            <p>{$order_info.shipping_time|date='Y-m-d H:i:s',###}</p>
                                        </if>
                                    </div>
                                </div>
                            </li>
                            <li><i class='y-comp91 <if condition="$order_info[confirm_time] eq 0">top322</if>'></i></li>
                            <li>
                                <div class="aloinfe fime4">
                                    <i class='y-comp5 <if condition="$order_info[confirm_time] eq 0">lef64</if>'></i>
                                    <div class="ddfon">
                                        <p>完成</p>
                                        <if condition="$order_info[confirm_time] gt 0">
                                            <p>{$order_info.confirm_time|date='Y-m-d H:i:s',###}</p>
                                        </if>
                                    </div>
                                </div>
                            </li>
                        </ul>
                    </div>
                    <div class="grouupanjf">
                        <if condition="$order_info.pay_status eq 0">
                            <a href="javascript:;">完成订单可能获得:<i class="y-comp7"></i>积分&nbsp;&nbsp;<i class="y-comp8"></i>会员成长值&nbsp;&nbsp;<i class="y-comp7"></i>优惠券</a>
                            <else/>
                            <!--<a href="javascript:;">-->
                                <!--<i class="y-comp7"></i>积分<span class="red">{$order_info.integral}</span>-->
                            <!--</a>-->
                            <!--<a href="javascript:;">-->
                                <!--<i class="y-comp8"></i>会员成长值<span class="red">+{$order_info.order_amount|intval}</span>-->
                            <!--</a>-->
                        </if>
                    </div>
                </div>
            </div>
        </div>
        <if condition="$order_info['shipping_status'] eq 1">
            <div class="home-main reseting ma-to-20">
                <div class="com-topyue">
                    <div class="wacheng fl">
                        <div class="shioeboixe">
                            <div class="sohstyle p">
                                <div class="odjpyes">
                                    <img src="__STATIC__/images/kuaidi-1.jpg"/>
                                </div>
                                <div class="osnhptek">
                                    <p><span>送货方式：</span><span>{$order_info.shipping_name}</span></p>
                                    <p><span>快递单号：</span><span>{$order_info.invoice_no}</span></p>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="wacheng2 fr">
                        <div class="listchatu">
                            <ul id="express_info">
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
            <script>
                queryExpress();
                function queryExpress()
                {
                    var shipping_code = "{$order_info['shipping_code']}";
                    var invoice_no = "{$order_info['invoice_no']}";
                    $.ajax({
                        type : "GET",
                        dataType: "json",
                        url:"/index.php?m=Home&c=Api&a=queryExpress&shipping_code="+shipping_code+"&invoice_no="+invoice_no,//+tab,
                        success: function(data){
                            var html = '';
                            if(data.status == 200){
                                $.each(data.data, function(i,n){
                                    if(i == 0){
                                        html += "<li class='first'><i class='node-icon'></i><span class='time'>"+n.time+"</span><span class='txt'>"+n.context+"</span></li>";
                                    }else{
                                        html += "<li><i class='node-icon'></i><span class='time'>"+n.time+"</span><span class='txt'>"+n.context+"</span></li>";
                                    }
                                });
                            }else{
                                html += "<li class='first'><i class='node-icon'></i><span class='txt'>"+data.message+"</span></li>";
                            }
                            $("#express_info").html(html);
                        }
                    });
                }
            </script>
        </if>
        <div class="home-main ma-to-20">
            <div class="rshrinfmas">
                <div class="spff">
                    <h2>收货人信息</h2>
                    <div class="psbaowq">
                        <p><span class="fircl">收货人：</span><span class="lascl">{$order_info.consignee}</span></p>
                        <p><span class="fircl">地址：</span>
                            <span class="lascl">{$region_list[$order_info['province']]},{$region_list[$order_info['city']]},{$region_list[$order_info['district']]},{$order_info.address}</span>
                        </p>
                        <p><span class="fircl">手机号码：</span><span class="lascl">{$order_info.mobile}</span></p>
                    </div>
                </div>
                <div class="spff">
                    <h2>配送信息</h2>
                    <div class="psbaowq">
                        <p><span class="fircl">配送方式：</span><span class="lascl">{$order_info.shipping_name}</span></p>
                        <p><span class="fircl">运费：</span><span class="lascl"><em>￥</em>{$order_info.shipping_price|default=0}</span></p>
                        <p><span class="fircl">买家留言：</span><span class="lascl">{$order_info.user_note|default=''}</span></p>
                    </div>
                </div>
                <div class="spff">
                    <h2>付款信息</h2>
                    <div class="psbaowq">
                        <p><span class="fircl">付款方式：</span><span class="lascl">{$order_info.pay_name}</span></p>
                        <p><span class="fircl">付款时间：</span><span class="lascl"><if condition="$order_info[pay_status] eq 1 or $order_info[pay_status] eq 2">{$order_info.pay_time|date='Y-m-d H:i:s',###}<else/>未支付</if></span></p>
                        <if condition="$order_info.order_prom_type neq 4">
                            <p><span class="fircl">商品总额：</span><span class="lascl"><em>￥</em>{$order_info.goods_price}</span></p>
                            <p><span class="fircl">运费金额：</span><span class="lascl"><em>￥</em>{$order_info.shipping_price}</span></p>
                            <p><span class="fircl">优惠券：</span><span class="lascl"><em>￥</em>{$order_info.coupon_price}</span></p>
                            <p><span class="fircl">积分抵扣：</span><span class="lascl"><em>￥</em>{$order_info.integral_money}</span></p>
                            <p><span class="fircl">订单优惠：</span><span class="lascl"><em>￥</em>{$order_info.order_prom_amount}</span></p>
                        </if>
                        <p><span class="fircl">余额支付：</span><span class="lascl"><em>￥</em>{$order_info.user_money}</span></p>
                        <!-- 预售商品 start -->
                        <if condition="$order_info.order_prom_type eq 4 AND $order_info.paid_money gt 0" >
                            <if condition="$order_info.pay_status eq 1">
                                <p><span class="fircl">已付尾款：</span><span class="lascl"><em>￥</em>{$order_info.order_amount}</span></p>
                            </if>
                            <tr>
                                <p><span class="fircl">已付订金：</span><span class="lascl"><em>￥</em>{$order_info.paid_money}</span></p>
                            </tr>
                            <tr>
                                <p><span class="fircl">发货时间：</span><span class="lascl"><em></em>{$order_info.pre_sell_deliver_goods}</span></p>
                            </tr>
                        </if>
                        <!-- 预售商品 end -->
                    </div>
                </div>
                <div class="spff mar0">
                    <h2>发票信息</h2>
                    <div class="psbaowq">
                        <p><span class="fircl">发票类型：</span><span class="lascl">普通发票</span></p>
                        <p><span class="fircl">发票抬头：</span><span class="lascl">{$order_info.invoice_title}</span></p>
                    </div>
                </div>
            </div>
        </div>
        <div class="beenovercom">
            <div class="shoptist">
                <span>{$tpshop_config['shop_info_store_name']}<a href="tencent://message/?uin={$tpshop_config['shop_info_qq']}&Site=TPshop商城&Menu=yes" target="_blank"><i class="y-comp9"></i></a></span>
            </div>
            <div class="orderbook-list">
                <div class="book-tit">
                    <ul>
                        <li class="sx1">商品</li>
                        <li class="sx2">商品编号</li>
                        <li class="sx3">购买单价</li>
                        <li class="sx4">赠送积分</li>
                        <li class="sx5">商品数量</li>
                        <li class="sx6">操作</li>
                    </ul>
                </div>
            </div>
            <div class="order-alone-li">
                <volist name="order_info.goods_list" id="goods">
                    <table width="100%" border="" cellspacing="" cellpadding="">
                        <tr class="conten_or">
                            <td class="sx1">
                                <div class="shop-if-dif">
                                    <div class="shop-difimg">
                                        <a href="{:U('Home/Goods/goodsInfo',array('id'=>$goods['goods_id']))}"><img src="{$goods.goods_id|goods_thum_images=78,78}"></a>
                                    </div>
                                    <div class="cebigeze">
                                        <div class="shop_name"><a href="{:U('Home/Goods/goodsInfo',array('id'=>$goods['goods_id']))}">{$goods.goods_name}</a></div>
                                        <p class="mayxl">{$goods.spec_key_name}</p>
                                    </div>
                                </div>
                            </td>
                            <td class="sx2">{$goods.goods_sn}</td>
                            <td class="sx3"><span>￥</span><span>{$goods.member_goods_price}</span></td>
                            <td class="sx4">
                                <span>{$goods.give_integral}</span>
                            </td>
                            <td class="sx5">
                                <span>{$goods.goods_num}</span>
                            </td>
                            <td class="sx6">
                                <div class="twrbac">
                                    <if condition="($order_info.comment_btn eq 1) and ($goods['is_comment'] eq 0)">
                                        <a href="{:U('Home/User/comment_list',array('order_id'=>$order_info['order_id'],'goods_id'=>$goods['goods_id']))}">评价</a>
                                        <span>|</span>
                                    </if>
                                    <if condition="($order_info[return_btn] eq 1) and ($goods[is_send] lt 2)">
                                        <a href="{:U('Home/User/return_goods',array('order_id'=>$order_info['order_id'],'order_sn'=>$order_info['order_sn'],'goods_id'=>$goods['goods_id'],'spec_key'=>$goods['spec_key']))}">申请售后</a>
                                    </if>

                                    <p>
                                        <a class="songobuy" href="{:U('Home/Goods/goodsInfo',array('id'=>$goods['goods_id']))}">再次购买</a>
                                    </p>
                                    <if condition="$goods[is_send] eq 0"><a>未发货</a></if>
                                    <if condition="$goods[is_send] eq 1"><a>已发货</a></if>
                                    <if condition="$goods[is_send] gt 1"><a>已申请售后</a></if>
                                </div>
                            </td>
                        </tr>
                    </table>
                </volist>
            </div>
        </div>
        <div class="numzjsehe">
            <p><span class="sp_tutt">商品总额：</span><span class="smprice"><em>￥</em>{$order_info.goods_price}</span></p>
            <p><span class="sp_tutt">返&nbsp;&nbsp;&nbsp;&nbsp;现：</span><span class="smprice"><em>￥</em>0.00</span></p>
            <p><span class="sp_tutt">运&nbsp;&nbsp;&nbsp;&nbsp;费：</span><span class="smprice"><em>￥</em>{$order_info.shipping_price}</span></p>
            <p><span class="sp_tutt">价格调整：</span><span class="smprice"><em>￥</em>
                <if condition="$order_info.discount gt 0">
                    -{:abs($order_info.discount)}
                <else/>
                    {:abs($order_info.discount)}
                </if>
                </span></p>
            <p><span class="sp_tutt">应付总额：</span><span class="smprice red"><em>￥</em>{$order_info.order_amount}</span></p>
        </div>
    </div>
</div>
<!--footer-s-->
<div class="footer p">
    <include file="public/footer_index" />
</div>
<!--footer-e-->
<script>
    //取消订单
    function cancel_order(id){
        layer.confirm("确定取消订单?",{
            btn:['确定','取消']
        },function(){
            location.href = "/index.php?m=Home&c=User&a=cancel_order&id="+id;
        }, function(tmp){
            layer.close(tmp);
        })
    }
    //确定收货
    function order_confirm(order_id){
        layer.confirm("你确定收到货了吗?",{
            btn:['确定','取消']
        },function(){
            location.href='/index.php?m=Home&c=User&a=order_confirm&id='+order_id;
        })
    }
</script>
</body>
</html>